import request from '@/utils/request'

// 查询产品工序计划列表
export function listBizProductProcessPlan (query) {
  return request({
    url: '/biz/bizProductProcessPlan/list',
    method: 'get',
    params: query
  })
}

// 查询产品工序计划详细
export function getBizProductProcessPlan (id) {
  return request({
    url: '/biz/bizProductProcessPlan/' + id,
    method: 'get'
  })
}

// 新增产品工序计划
export function addBizProductProcessPlan (data) {
  return request({
    url: '/biz/bizProductProcessPlan',
    method: 'post',
    data: data
  })
}

// 修改产品工序计划
export function updateBizProductProcessPlan (data) {
  return request({
    url: '/biz/bizProductProcessPlan',
    method: 'put',
    data: data
  })
}

// 删除产品工序计划
export function delBizProductProcessPlan (id) {
  return request({
    url: '/biz/bizProductProcessPlan/' + id,
    method: 'delete'
  })
}


// 导出产品工序计划
export function exportBizProductProcessPlan (query) {
  return request({
    url: '/biz/bizProductProcessPlan/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/biz/bizProductProcessPlan/getInitData/' + dictTypes,
    method: 'get'
  })
}
export function getBizProductProcessPlanByProductId (productId) {
  return request({
    url: '/biz/bizProductProcessPlan/listByProductId/' + productId,
    method: 'get'
  })
}

export function getListBizProductProcessPlan (productId) {
  return request({
    url: '/biz/bizProductProcessPlan/listBizProductProcessPlan/' + productId,
    method: 'get'
  })
}


